﻿@{
    ViewBag.Title = "GetClassScore";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}

@section head{
    <link href="~/Scripts/bower_components/jPages/css/jPages.css" rel="stylesheet"/>
    <link href="~/Scripts/bower_components/jPages/css/animate.css" rel="stylesheet"/>
    <style>
        .edit, .editer { width: 200px; }

        .table-no { border-left: 30px; }

        .am-u-sm-10 {
            padding-left: 5px;
            padding-top: 10px;
        }

        .am-form { margin-top: 30px; }

        .sele {
            padding-left: 20px;
            width: 100px;
        }
    </style>
}
<div class="am-cf am-padding">
    <div class="am-fl am-cf">
        <strong class="am-text-primary am-text-lg">@ViewBag.test</strong> / <small> 成绩单</small>
    </div>
</div>

<div class="am-g am-inline">
    <form class=" am-form am-form-inline" role="form" method="POST" action="/admin/manage/Getclassscore" id="addform">
        <input name="id" value="@ViewBag.id" hidden="hidden"/>
        <div class="am-form-group am-form-select sele">
            <select id="doc-select-1" name="classname">
                @foreach (var temp in ViewBag.Class)
                {
                    <option value="@temp">@temp</option>
                }
            </select><span class="am-form-caret"></span>
        </div>
        <button type="submit" class="am-btn am-btn-default">确定</button>
    </form>
</div>


<div class="am-g">
    <div class="am-u-sm-12">
        <form class="am-form">
            <table class="am-table am-table-striped am-table-hover table-main" id="table">
                <thead>
                <tr>
                    <th class="table-name">名字</th>
                    <th class="table-name">学号</th>
                    <th class="table-name">班级</th>
                    <th class="table-date">分数</th>

                </tr>
                </thead>
                <tbody id="itemContainer">
                @if (ViewBag.count == 0)
                {
                    @: 无信息！
                }
                else
                {
                    var i = 1;
                    foreach (var Tempx in ViewBag.list)
                    {
                        <tr id="">
                            <td hidden="hidden" class="ider"> </td>
                            <td class="">@Tempx.Account.Name</td>
                            <td class="">@Tempx.Account.StudentNum</td>
                            <td class="">@Tempx.Account.Class</td>
                            @if (Tempx.Score.Score1 == -1)
                            {
                                <td class="edit timeer">没有成绩</td>
                            }
                            else
                            {
                                <td class="edit timeer">@Tempx.Score.Score1</td>
                            }
                        </tr>
                        i++;
                    }
                }
                </tbody>
            </table>
            <div class="am-cf">
                共 @ViewBag.count 条记录
                <div class="am-fr">
                    <div class="holder am-pagination"></div>
                </div>
            </div>
            <hr/>
            <p id="xxx">注：哇哈哈哈哈哈哈哈</p>
        </form>
    </div>
</div>


@section scripts{

    <script src="~/Scripts/Other/jquery.editable-1.3.3.js"></script>
    <script src="~/Scripts/Other/jpages.js"></script>
    <script src="~/Scripts/Other/jquery.tablesorter.js"></script>
    <script>


        $(function() {
            $("#table").tablesorter({ sortList: [[1, 0]] });
            $("div.holder").jPages({
                containerID: "itemContainer",
                perPage: 15
            });


        });
    </script>
}